package com.peking.donations.base.util;

import java.util.UUID;

/**
 * @auther wangyazhou
 * @Date: 2016/3/2 0002
 * @Time: 下午 4:18
 */
public class UUIDUtil {

    public static String getUUid(){
        UUID uuid = UUID.randomUUID();
        String str = uuid.toString();
        // 去掉"-"符号
        String temp = str.replaceAll("-","");
        //substring(0, 8) + str.substring(9, 13) + str.substring(14, 18) + str.substring(19, 23) + str.substring(24);
        return temp;
    }

    public static void main(String[] args) {
        System.out.println(UUIDUtil.getUUid());
    }

}
